$(document).ready(function () {
    $(".auth-warn").show();
    $.ajax({
        url: '/api/v1.0/users/auth',
        type: 'get',
        success: function (resp) {
            if (resp.errno == '0') {
                $('.house-title h3').html('您已完成实名');
                $('.house-content a').attr('disabled', true).html('已完成实名').attr('href', 'javascript:;');
            }
        }
    });
    $.ajax({
        url: '/api/v1.0/user/houses',
        type: 'get',
        success: function (resp) {
            console.log(resp)
            if (resp.errno == '0') {
                let houses_info = resp.data;
                console.log('content_html', houses_info)
                let html = template('house-info', {houses: houses_info});
                $('#houses-list').append(html);
            } else {
                alert(resp.errmsg);
            }
        }
    })
})
